document.getElementById('loginForm').addEventListener('submit', function(event) {  
	event.preventDefault(); // 阻止表单的默认提交行为  
	  
	var username = document.getElementById('username').value;  
	var password = document.getElementById('password').value;  
	  
	// 这里我们只是简单地检查用户名和密码是否为"admin"，实际中应使用后端验证  
	if (username === '' && password === '1') {  
	    document.getElementById('mainPage').classList.remove('hidden'); // 显示主内容区域  
		document.getElementById('loginContainer').classList.add('hidden');
		alert('欢迎你进入AC算法社');
		// 初始加载数据
		console.log('I am initializing data');
		var today = getToday();
		// console.log(today);
		var input_data = document.getElementById('myDate');
		input_data.value = today;
		loadData(today);
	} else {  
	    alert('用户名或密码错误！');  
	}  
});


    
function loadingregister()
{
	var login = document.getElementById('loginContainer');
    login.classList.add('hidden');
    var register = document.getElementById('registerContainer');
    register.classList.remove('hidden');
}